
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type AgreementRequest struct {

	Type string `json:"type" form:"type"`

	Title string `json:"title" form:"title"`

	Content string `json:"content" form:"content"`

	Sort string `json:"sort" form:"sort"`

	Status string `json:"status" form:"status"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *AgreementRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *AgreementRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"type": "required",

		"title": "required",

		"content": "required",

		"sort": "required",

		"status": "required",

		"add_time": "required",

	}
}

func (r *AgreementRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AgreementRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AgreementRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
